import Vue from 'vue'

import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import SocketIO from './socket.io/index'

import MuseUI from 'muse-ui'
import 'muse-ui/dist/muse-ui.css'
import 'typeface-roboto'
import './themes/index'
import './themes/index.scss'
import '@/components/index'

import VueLogger from 'vuejs-logger'

Vue.use(MuseUI)

Vue.config.productionTip = false

Vue.prototype.$bus = new Vue()
Vue.prototype.$sio = new SocketIO(
  process.env.VUE_APP_API_SOCKETIO,
  process.env.VUE_APP_API_SOCKETIOPATH,
)
const isProduction = process.env.NODE_ENV === 'production'

const options = {
  isEnabled: !isProduction,
  logLevel: isProduction ? 'error' : 'debug',
  stringifyArguments: false,
  showLogLevel: true,
  showMethodName: true,
  separator: '|',
  showConsoleColors: true,
}

Vue.use(VueLogger, options)

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
